<template>
	<view>
		<view class="recored" v-for="(item,index) in recoredArrs" :key="index">
			<p>序号：{{item.rid}}</p>
			<p>时间：{{item.reservationDate | formatDate}} &nbsp;{{item.period}}</p>
			<p>医院：{{item.address}}</p>
			<p>地址：{{item.detailed}}</p>
			<p>科室：{{item.vaccineBrand}}个人预约第{{item.needleNum}}针</p>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				recoredArrs:[]
			}
		},
		methods: {
			async getRecords() {
				const res = await this.$request({
					url:'/api/v1/reservations',
					header:{
						'Authorization': 'Bearer ' + this.$getStorageSync("token") 
					},
					method:'GET'
				}) ;
				this.recoredArrs = res.data.data ;
			}
		},
		onLoad:function(){
			this.getRecords() ;
		}
	}
</script>

<style>
	@import url("reservation_recored.css");
</style>
